<layout name="layout" />
<ul class="uk-breadcrumb">
    <li><a href="__APP__">Home</a></li>
    <li><a href="__CONTROLLER__/index">Product List</a></li>
    <li class="uk-active"><span>Shoppingcart</span></li>
</ul>
<eq name="shopcart['cart_items']" value="0">
    <div class="uk-block">
        <div class="uk-alert uk-alert-warning">The shopping cart is empty....</div>
    </div>
    <a class="uk-button" href="__MODULE__/Product/index">
        << &nbsp;Back to shopping</a>
            <else/>
            <table class="uk-table uk-form">
                <thead>
                    <tr>
                        <th>Product</th>
                        <th>Price</th>
                        <th>Quantity</th>
                        <th>Total</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
                    <volist name="shopcart['cart_arr']['items']" id="vo">
                        <tr>
                            <td>
                                <a class="uk-thumbnail" href="__CONTROLLER__/details/pid/{$vo['data']['pid']}">
                                    <img src="__PUBLIC__/Uploads/{$vo['data']['dir']}/thumb_{$vo['data']['img']}" alt="{$vo['data']['product_name']}">
                                    <div class="uk-thumbnail-caption">{$vo['data']['product_name']}</div>
                                </a>
                            </td>
                            <td>{$vo['data']['price']|number_format="2"}</td>
                            <td>
                                <a href="__CONTROLLER__/minus/itemid/{$vo.id}" class="uk-icon-minus uk-icon-hover"></a>
                                <input type="text" name="quantity" size="5" maxlength="2" value="{$vo['data']['quantity']}" />
                                <a href="__CONTROLLER__/add/itemid/{$vo.id}" class="uk-icon-plus uk-icon-hover"></a>
                            </td>
                            <td>{$vo['data']['price']*$vo['data']['quantity']|number_format="2"}</td>
                            <td>
                                <a href="javascript:void(0)" class="uk-icon-trash uk-icon-hover" onclick="confirmDelete('__CONTROLLER__/remove/itemid/{$vo.id}')"></a>
                            </td>
                        </tr>
                    </volist>
                </tbody>
            </table>
            <div class="uk-float-left">
                <a class="uk-button" href="__CONTROLLER__/index">
                    << &nbsp;Continue to shop</a>
            </div>
            <div class="uk-float-right">
                <ul class="uk-list">
                    <li><b>Total items&nbsp;:&nbsp;{$shopcart['cart_items']}</b></li>
                    <li><b>Total Amount&nbsp;:&nbsp;${$shopcart['cart_amount']|number_format="2"}</b></li>
                </ul>
                <a class="uk-button uk-button-primary" href="__MODULE__/Orders/checkout">>>&nbsp;Check Out</a>
            </div>
</eq>
